import java.util.Scanner;
import java.util.Stack;

public class Test {
    public static void main(String[] args) {
        Stack<Integer> stack=new Stack<>();
        stack.push(15);
        stack.push(25);
        stack.push(35);
        stack.push(45);
        stack.push(55);
        System.out.println(stack);
        stack.pop();
        System.out.println(stack);
        Object ret=stack.peek();
        Solution solution=new Solution();
        Scanner scanner=new Scanner(System.in);
        String s=scanner.next();
        boolean flg=solution.isValid(s);
        System.out.println(flg);

        int [] pushV={1,2,3,4,5};
        int [] popV={4,5,3,2,1};
        boolean flg2=solution.IsPopOrder(pushV,popV);
        System.out.println(flg2);
    }
}
